<template>
  <div class="main">

    <view class="user_func">
      <view class="func_setting" @click="toBindingAccount">
        <text class="func_desc">账号绑定</text>
        <img class="func_icon" src='http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180611/2018061109521164553.jpg'></img>
      </view>
      <view class="func_setting" @click="toForgetPwd">
        <text class="func_desc">修改登录密码</text>
        <img class="func_icon" src='http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180611/2018061109521164553.jpg'></img>
      </view>
    </view>

    <!-- <view class="user_func">
      <view class="func_setting" @click="toMsgSetting">
        <text class="func_desc">消息设置</text>
        <img class="func_icon" src='http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180611/2018061109521164553.jpg'></img>
      </view>
    </view> -->

    <view class="bottom_logout" @click="toLogout">
      <text class="logout_desc">退出当前账号</text>
    </view>

  </div>
</template>

<script>

export default {
  data () {
    return {
      logs: []
    }
  },
  methods: {
    toForgetPwd () {
      this.$router.push({ path: '/pages/accounts/forgetpassword/main' })
    },
    toMsgSetting () {
      this.$router.push({ path: '/pages/me/msg_setting/main' })
    },
    toBindingAccount () {
      this.$router.push({ path: '/pages/me/binding_accounts/main' })
    },
    toLogout () {
      wx.showModal({
        title: '提示',
        content: '退出当前账号',
        confirmText: '确定',
        cancelText: '取消',
        success: function (res) {
          console.log(res)
          if (res.confirm) {
            wx.reLaunch({
              url: '/pages/accounts/login/main'
            })
          } else {
          }
        }
      })
    }
  }
}
</script>

<style>
@import './setting.css';
</style>
